package org.tea.inventory.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;

/**
 * @author hanzy
 * @description 活动
 * @date 2023年04月06日 15:10
 */
@Data
public class ActDto extends BaseActDto {


    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    @ApiModelProperty(value = "奖池id")
    private Long prizePoolId;

    /**
     * 第三方url
     */
    @ApiModelProperty(value = "活动地址")
    private String activityUrl;

    @NotBlank(message = "开始时间不能为空")
    private String startCron;

    @NotBlank(message = "结束时间不能为空")
    private String endCron;

    @ApiModelProperty(value = "抽奖次数")
    private Integer prizeNum;

    @ApiModelProperty(value = "关联兑奖券 0-未关联 1-关联")
    private String relationCoupon;

    @ApiModelProperty(value = "关联兑奖券id")
    private List<Long> couponIds;

    @ApiModelProperty(value = "兑换截至日期")
    private String couponEndCron;

    private Date couponEndTime;
}
